<template>
  <div class="result">
    <div class="result-header">
      <div class="title">
        <p>你是</p>
        <!-- <p class="title-type">
          <span>E</span>外向
        </p>
        <p class="title-type">
          <span>S</span>感觉
        </p>
        <p class="title-type">
          <span>F</span>情感
        </p>
        <p class="title-type">
          <span>J</span>判断
        </p> -->
        <p class="title-type" v-for="(item,index) in opt.code" :key="index">
          <span>{{item}}</span>
        </p>
        <p>型人</p>
      </div>

      <div class="desc">
        <!-- <p>热情主动的帮别人把事情做好的主人</p> -->
        <p>{{opt.type.label}}</p>
        <!-- <p>{{opt.composite.content}}</p> -->
        <!-- <span class="desc-tag">富有同情心</span>
        <span class="desc-tag">实事求是</span>
        <span class="desc-tag">关注细节</span>
        <span class="desc-tag">主动性强</span> -->
      </div>
    </div>
    <div class="result-desc">
      <!-- <p class="title">性格描述</p> -->
      <p>
        测试结果得分最高
        <span class="title">{{opt.type.code}}</span>
      </p>
      <p>
        <!-- ESFJ(外向+感觉+情感+判断) -->

      </p>
    </div>
    <div class="answer-result">
      <p>
        {{opt.type.character}}
      </p>
      <p>
        【职业建议】{{opt.type.advise}}
      </p>
      <p>
        【共同特点】{{opt.type.common}}
      </p>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      opt: {}
    }
  },
  created() {
    // console.log(this.$route.query.key)
    this.opt = this.$route.query.key
  }
}
</script>
<style lang="less" scoped>
.result {
  font-size: 0;
  .result-header {
    padding: 0.6rem;
    background-color: #819ce4;
    color: #ffffff;
    font-size: 0;
    width: 100%;
    height: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    p {
      font-size: 0.38rem;
      margin: 0;
    }
    .title {
      display: flex;
      justify-content: space-around;
      .title-type {
        display: flex;
        flex-direction: column;
        span {
          width: 0.5rem;
          height: 0.5rem;
          padding-top: 0.05rem;
          background-color: #ffffff;
          border-radius: 50%;
          color: #000000;
        }
      }
    }
    .desc {
      font-size: 0.38rem;
      p {
        // width: 60%;
        margin: 0.1rem auto;
      }
      .desc-tag {
        font-size: 0.28rem;
        background-color: #4766a9;
        padding: 0.05rem 0.1rem;
        border-radius: 1rem;
      }
    }
  }
  .result-desc {
    font-size: 0.36rem;
    padding: 0 0.3rem;
    .title {
      background-color: #819ce4;
      color: #ffffff;
      width: 0.5rem;
      height: 0.5rem;
      padding-top: 0.05rem;
      display: inline-block;
      border-radius: 50%;
    }
  }
  .answer-result {
    font-size: 0.32rem;
    padding: .3rem;
  }
}
</style>
